import { ConfigManager } from "../../../com/gengine/resource/ConfigManager";
type int = number;
//class ProxyConfig
    
    export  class ProxyConfig
    {
        constructor()
        {
            
            this._map = new Map<any, any> /* flash.utils.Dictionary */();
            if (ProxyConfig._instance != null) 
            {
                throw new Error(" BossConfig 单例 ");
            }
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            var loc1=ConfigManager.instance.getJSONByFileName("t_proxy.json");
            this.write(loc1);
            return;
        }

        /* internal  */write(arg1: Object): void
        {
            var loc1=null;
            var loc2=0;
            var loc3=arg1;
            for(loc1 of loc3) 
            {
                this._map[loc1.proxyId] = loc1;
            }
            return;
        }

        public getProxyName(arg1: int): string
        {
            var loc1=this._map[arg1];
            if (loc1) 
            {
                return loc1.proxyNameShow;
            }
            return arg1.toString();
        }

        public static get instance(): ProxyConfig
        {
            if (ProxyConfig._instance == null) 
            {
                ProxyConfig._instance = new ProxyConfig();
            }
            return ProxyConfig._instance;
        }

        /* internal */ /* var */_map: Map<any, any> /* flash.utils.Dictionary */;

        /* internal */ static /* var */_instance: ProxyConfig;
    }
